package com.ruoyi.business.service.impl;

import java.util.List;

import com.ruoyi.business.mapper.WsdUserAccountMapper;
import com.ruoyi.business.service.IWsdUserAccountService;
import com.ruoyi.common.core.domain.entity.WsdUserAccount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户账户Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-19
 */
@Service
public class WsdUserAccountServiceImpl implements IWsdUserAccountService
{
    @Autowired
    private WsdUserAccountMapper wsdUserAccountMapper;

    /**
     * 查询用户账户
     *
     * @param accountId 用户账户主键
     * @return 用户账户
     */
    @Override
    public WsdUserAccount selectWsdUserAccountByAccountId(Long accountId)
    {
        return wsdUserAccountMapper.selectWsdUserAccountByAccountId(accountId);
    }

    /**
     * 查询用户账户列表
     *
     * @param wsdUserAccount 用户账户
     * @return 用户账户
     */
    @Override
    public List<WsdUserAccount> selectWsdUserAccountList(WsdUserAccount wsdUserAccount)
    {
        return wsdUserAccountMapper.selectWsdUserAccountList(wsdUserAccount);
    }
    @Override
    public WsdUserAccount selectWsdUserAccount(WsdUserAccount wsdUserAccount)
    {
        return wsdUserAccountMapper.selectWsdUserAccount(wsdUserAccount);
    }

    /**
     * 新增用户账户
     *
     * @param wsdUserAccount 用户账户
     * @return 结果
     */
    @Override
    public int insertWsdUserAccount(WsdUserAccount wsdUserAccount)
    {
        return wsdUserAccountMapper.insertWsdUserAccount(wsdUserAccount);
    }

    /**
     * 修改用户账户
     *
     * @param wsdUserAccount 用户账户
     * @return 结果
     */
    @Override
    public int updateWsdUserAccount(WsdUserAccount wsdUserAccount)
    {
        return wsdUserAccountMapper.updateWsdUserAccount(wsdUserAccount);
    }

    /**
     * 批量删除用户账户
     *
     * @param accountIds 需要删除的用户账户主键
     * @return 结果
     */
    @Override
    public int deleteWsdUserAccountByAccountIds(Long[] accountIds)
    {
        return wsdUserAccountMapper.deleteWsdUserAccountByAccountIds(accountIds);
    }

    /**
     * 删除用户账户信息
     *
     * @param accountId 用户账户主键
     * @return 结果
     */
    @Override
    public int deleteWsdUserAccountByAccountId(Long accountId)
    {
        return wsdUserAccountMapper.deleteWsdUserAccountByAccountId(accountId);
    }
}
